import request from '@/utils/request'

const baseURL = '/tagValueFifteen'

/**
 * 分页查询实时数据列表
 * @param data {tagCode: String, startTime: String, endTime: String, cycle: String, pageNumber, pageSize}
 * @returns {*}
 */
export function realTimeDataPageList (data = {}) {
  return request({
    url: `${baseURL}/realTimeDataPageList`,
    method: 'post',
    data,
  })
}

/**
 * 查询实时数据列表
 * @param data
 * @returns {*}
 */
export function realTimeDataList (data = {}) {
  return request({
    url: `${baseURL}/realTimeDataList`,
    method: 'post',
    data,
  })
}

/**
 * 修改实时数据
 * @param data {id: String, val: Number, source: String, tagCode: String}
 * @returns {*}
 */
export function updateRealTimeData (data = {}) {
  return request({
    url: `${baseURL}/updateRealTimeData`,
    method: 'post',
    data,
  })
}
